package com.yaowk.service.mall.clothing.entity;

import com.yaowk.service.system.entity.SysUser;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 会员
 */
@Getter
@Setter
@ToString
@Entity
@DynamicUpdate
@DynamicInsert
public class CmMember extends SysUser {

    @Column(unique = true, nullable = false)
    private String code; // 编号
    private String account; // 注册账号
    private String realName; // 姓名
    private String phoneNumber; // 电话号码
    private Byte sex; // 性别
    private Integer hight; // 身高
    private Float weight; // 体重
    private Integer shoulder; // 肩宽
    private Integer chestline; // 胸围
    private Integer neckline; // 领围
    private Integer waistline; // 腰围
    private Integer length; // 衣长
    private Integer hipline; // 臀围
    private Integer outseam; // 裤长
    private String headUrl; // 头像
    private Byte active; // 是否激活
    private Date inputTime; // 录入时间
    private Date activeTime; // 激活时间
    private String remark; // 备注
    private Date lastOrderTime; // 最后一次成交时间
    @CreationTimestamp
    @Column(updatable = false)
    private Date createTime; // 注册时间

    // 会员数据
    private Integer integrate; // 积分
    private Integer turnoverOrder; // 成交订单量
    private BigDecimal turnoverMoney; // 成交额

    @ManyToOne
    private CmMemberGroup memberGroup; // 会员组
    @ManyToOne
    private CmMemberLevel memberLevel; // 会员等级
    @ManyToOne
    private CmSurveyor surveyor; // 量体师

}